package yesjava;

public abstract class Person {
    private String name;
    private String sex;
    private String personNo;

    public void say() {
        System.out.println("我是" + name + ",性别:" + sex + ",身份证号码:" + personNo);
    }

    public abstract void eat();

    public String getName() {
        return name;
    }

    public Person setName(String name) {
        this.name = name;
        return this;
    }

    public String getSex() {
        return sex;
    }

    public Person setSex(String sex) {
        this.sex = sex;
        return this;
    }

    public String getPersonNo() {
        return personNo;
    }

    public Person setPersonNo(String personNo) {
        this.personNo = personNo;
        return this;
    }
}
